const fs = require('fs')
function getFile(filename) {
    return new Promise((resolve, reject) => {
        // resolve(1)
        fs.readFile(filename, 'utf8', (err, data) => {
            resolve(data)
        })
    })
}
let f1 = getFile('./text1.txt')
let f2 = getFile('./text2.txt')
// console.log(f1);
// f1.then(data=>{
// console.log(data);
f2.then(data => {
    f1.then(d2 => {
        console.log(d2);
        console.log(data);
    })
})